"""Add training datetime rows

Revision ID: 75e3aa08c6f2
Revises: 27711ff8d964
Create Date: 2024-04-17 19:53:28.581089

"""
from typing import Sequence, Union

from alembic import op
import sqlalchemy as sa


# revision identifiers, used by Alembic.
revision: str = '75e3aa08c6f2'
down_revision: Union[str, None] = '27711ff8d964'
branch_labels: Union[str, Sequence[str], None] = None
depends_on: Union[str, Sequence[str], None] = None


def upgrade() -> None:
    # ### commands auto generated by Alembic - please adjust! ###
    op.add_column('Trainings', sa.Column('date_add', sa.DateTime(), nullable=False))
    op.add_column('Trainings', sa.Column('date_update', sa.DateTime(), nullable=False))
    op.create_unique_constraint(None, 'Trainings', ['id'])
    # ### end Alembic commands ###


def downgrade() -> None:
    # ### commands auto generated by Alembic - please adjust! ###
    op.drop_constraint(None, 'Trainings', type_='unique')
    op.drop_column('Trainings', 'date_update')
    op.drop_column('Trainings', 'date_add')
    # ### end Alembic commands ###
